#include <iostream>
#include <cstdio>
using namespace std;
int a[81],b[81],c[81],d[81],e[81],f[81],g[81];
int n,m;
double ba,ca,da,ea,fa,ga;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    	cin>>a[i]>>b[i]>>c[i]>>d[i]>>e[i]
    	>>f[i]>>g[i];
		ba+=b[i];
		ca+=c[i];
		da+=d[i];
		ea+=e[i];
		fa+=f[i];
		ga+=g[i];
	}
	for(int i=1;i<=n;i++)
	{
		cout<<a[i]<<" "<<b[i]<<" "<<c[i]<<" "
		<<d[i]<<" "<<e[i]<<" "<<f[i]<<" "<<g[i]
		<<" "<<b[i]+c[i]+d[i]+e[i]
		+f[i]+g[i]<<endl;
	}
	printf("%.1f %.1f %.1f %.1f %.1f %.1f ",
		ba/n,ca/n,da/n,ea/n,fa/n,ga/n);
}